#ifndef _CAMERACLASS_H_
#define _CAMERACLASS_H_

#include <d3dx10math.h>
#include "inputclass.h"

static const  float CAMERASPEED = 0.2f; 
static const  float CAMERAANGLESPEED  = 0.1f; 
static const D3DXVECTOR3 CAMERA_INIT_POSITION = D3DXVECTOR3(0.0f, 0.0f, -10.0f);

static const  float PI = 3.14159265358979323846f;

static const inline float DEG2RAD (float a )  { return a * PI / 180.f; };

class CameraClass
{
public:
	CameraClass();
	CameraClass(const D3DXVECTOR3& i_pos);

	void SetPosition(float, float, float);
	void SetRotation(float, float, float);

	void SetPosition(const D3DXVECTOR3& i_pos);
	void SetRotation(const D3DXVECTOR3& i_rot);

	const D3DXVECTOR3& GetPosition() const;
	const D3DXVECTOR3& GetRotation() const;

	void Render					();
	void Update					(InputClass* i_inputMgr);
	void GetViewMatrix			(D3DXMATRIX&);
	void GetStaticViewMatrix	(D3DXMATRIX& viewMatrix);

private:
	float		m_yaw, m_pitch, m_roll;
	D3DXVECTOR3 m_up, m_right, m_position, m_lookAt, m_rotation;
	D3DXMATRIX	m_rotationMatrix, m_viewMatrix, m_staticViewMatrix;
};

#endif